<html>
				<head>
				<meta http-equiv="content-type" content="text/html; charset=UTF-8">
				</head>
				<body><pre>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap(9)</a> FreeBSD Kernel Developer's Manual <a href="http://www.freebsd.org/cgi/man.cgi?query=PMAP&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">PMAP(9)</a></pre>
<pre>
<b>名称</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pmap -- 虚拟内存子系统的机器相关部分</pre>
<pre>
<b>概要</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#include &lt;<font color="dark">sys/param.h</font>&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#include &lt;<font color="dark">vm/vm.h</font>&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#include &lt;<font color="dark">vm/pmap.h</font>&gt;</pre>
<pre>
<b>详述</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pmap模块是FreeBSD VM(虚拟内存 Virtual Memory)子系统的机器相关部分。此处
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;涉及的每一个函数，必须在相关平台上有一份单独实现。
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pmap模块的作用是管理那些和硬件相关的对象，例如页表(page tables)，地址映射
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(address maps)，TLBs，等。
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机器相关代码必须提供头文件&lt;&lt;<font color="dark">machine/pmap.h</font>&gt;&gt;。该文件包含pmap数据结构的定义：
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;struct pmap {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Contents defined by pmap implementation. */
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typedef struct pmap *pmap_t;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;该头文件也可能会定义pmap实现(pmap implementation)中所需的其它数据结构。
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;头文件&lt;&lt;<font color="dark">vm/pmap.h</font>&gt;&gt;中定义了一个用来追踪pmap统计信息的数据结构。
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;该结构定义如下：
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;struct pmap_statistics {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;long resident_count; /* number of mapped pages */
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;long wired_count; /* number of wired pages */
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;具体的struct pmap实现中必须包含一个该结构的名为pm_stats的实例(instance)，
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;并且必须在每一次相关pmap操作之后被更新。</pre>
<pre>
<b>参见</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_activate&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_activate(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_addr_hint&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_addr_hint(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_change_wiring&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_change_wiring(9)</a>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_clear_modify&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_clear_modify(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_clear_reference&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_clear_reference(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_copy&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_copy(9)</a>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_copy_page&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_copy_page(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_enter&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_enter(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_extract&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_extract(9)</a>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_extract_and_hold&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_extract_and_hold(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_growkernel&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_growkernel(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_init&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_init(9)</a>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_init2&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_init2(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_is_modified&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_is_modified(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_is_prefaultable&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_is_prefaultable(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_map&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_map(9)</a>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_mincore&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_mincore(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_object_init_pt&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_object_init_pt(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_page_exists_quick&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_page_exists_quick(9)</a>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_page_init&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_page_init(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_page_protect&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_page_protect(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_pinit&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_pinit(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_pinit0&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_pinit0(9)</a>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_pinit2&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_pinit2(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_protect&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_protect(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_qenter&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_qenter(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_qremove&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_qremove(9)</a>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_release&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_release(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_remove&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_remove(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_remove_all&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_remove_all(9)</a>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_remove_pages&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_remove_pages(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_resident_count&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_resident_count(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_ts_modified&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_ts_modified(9)</a>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_wired_count&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_wired_count(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_zero_area&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_zero_area(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_zero_idle&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_zero_idle(9)</a>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=pmap_zero_page&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">pmap_zero_page(9)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=vm_map&sektion=9&apropos=0&manpath=FreeBSD+6.1-RELEASE">vm_map(9)</a></pre>
<pre>
<b>作者</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;本手册页由Bruce M Simpson&lt;bms@spc.org&gt;撰写。</pre>
</pre>
</body></html>